//
//  Quartz2DViewController.m
//  iOSStudy
//
//  Created by Evan Xie on 12/2/15.
//  Copyright © 2015 Family Wings. All rights reserved.
//

#import "Quartz2DViewController.h"

@interface Quartz2DViewController ()

@end

@implementation Quartz2DViewController

- (instancetype)initWith2DViewClassName:(NSString *)className
{
    if (self = [super init]) {
        _className = [className copy];
    }
    return self;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    CGRect frame = CGRectMake(0, 84, self.view.bounds.size.width, self.view.bounds.size.height-104);
    UIView *view = [[NSClassFromString(self.className) alloc] initWithFrame:frame];
    view.backgroundColor = [UIColor clearColor];
    view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
    [self.view addSubview:view];
}

@end
